package com.kordar.rbac;

import java.io.Serializable;
import java.util.Map;

public interface Executor extends Serializable {
    /**
     * Executes the rule.
     *
     * @param user $user the user ID. This should be either an integer or a string representing
     *                   the unique identifier of a user. See [[\yii\web\User::id]].
     * @param item       $item the role or permission that this rule is associated with
     * @param params      $params parameters passed to [[CheckAccessInterface::checkAccess()]].
     * @return bool a value indicating whether the rule permits the auth item it is associated with.
     */
    boolean execute(Long user, Item item, Map<String, Object> params);
}
